package com.vcredit.creditcat.manager.speedloan;

import java.util.List;
import java.util.Map;

import com.vcredit.creditcat.dto.speedloan.*;
import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.vcredit.creditcat.api.ISpeedloanManager;
import com.vcredit.creditcat.model.Cust;
import com.vcredit.creditcat.service.speedloan.SpeedloanService;

/**
 * 快速贷款
 * @author zhaoqi01
 */
@Service(protocol = { "protocol1" }, version = "1.0")
public class SpeedloanManager implements ISpeedloanManager{

	@Autowired
	private SpeedloanService speedloanService;


	/**
	 * 快速贷款预检（列表或单个）
	 * @throws Exception
	 */
	@Override
	public SpeedloanPrecheckDto precheckList(Cust cust,String appDesc) throws Exception {
		return speedloanService.precheckList(cust,appDesc);
	}


	@Override
	public SpeedloanPrecheckItemDto creditPrecheck(Map<String,Object> paramMap, Cust cust) throws Exception {
		return speedloanService.creditPrecheck(paramMap, cust);
	}


	@Override
	public SpeedloanIndexDto index(Cust cust, String accessToken, String appDesc, Long productId,
			int pageIndex, int pageSize) throws Exception {
		return speedloanService.index(cust, accessToken, appDesc, productId, pageIndex, pageSize);
	}

	@Override
	public SpeedloanCanApplyProductsDto getCanApplyProducts(Cust cust, String appDesc) throws Exception {
		return speedloanService.getCanApplyProducts(cust,appDesc);
	}

	@Override
	public SpeedloanPreviewDto speedloanPreview(Cust cust, String appDesc) throws Exception {
		return speedloanService.speedloanPreview(cust,appDesc);
	}

	@Override
	public void speedloanCommit(Cust cust, String appDesc, Map<String, Object> paramMap) throws Exception {
		speedloanService.speedloanCommit(cust,appDesc,paramMap);
	}

	@Override
	public List<LoanProductsDto> popularRecommend(Cust cust, String appDesc, String accessToken, Map<String, Object> paramMap) throws Exception {
		return speedloanService.popularRecommend(cust,appDesc,accessToken,paramMap);
	}

	@Override
	public SpeedIndexV3Dto indexV3(Cust cust, String refreshFields, String accessToken, String appDesc, int pageIndex, int pageSize) throws Exception {
		// TODO Auto-generated method stub
		// TODO Auto-generated method stub
		return speedloanService.indexV3(cust, refreshFields,accessToken, appDesc, pageIndex, pageSize);
	}



}
